home *** CD-ROM | disk | FTP | other *** search
/ Spacewalker F97 / Spacewalker F97.iso / RECYCLED / DD37.FR_ / DD37.FR (.txt)
Encoding:
Visual Basic Form  |  1996-01-28  |  4.7 KB  |  156 lines

  1. VERSION 4.00
  2. Begin VB.Form frmParms 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Parameters"
  5.    ClientHeight    =   2136
  6.    ClientLeft      =   480
  7.    ClientTop       =   1416
  8.    ClientWidth     =   5844
  9.    ControlBox      =   0   'False
  10.    Height          =   2520
  11.    Left            =   432
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2136
  16.    ScaleWidth      =   5844
  17.    Top             =   1080
  18.    Width           =   5940
  19.    Begin VB.HScrollBar hsbRelWallHeight 
  20.       Height          =   252
  21.       LargeChange     =   38
  22.       Left            =   2160
  23.       Max             =   400
  24.       Min             =   20
  25.       TabIndex        =   8
  26.       Top             =   1080
  27.       Value           =   200
  28.       Width           =   3372
  29.    End
  30.    Begin VB.HScrollBar hsbRelWallThickness 
  31.       Height          =   252
  32.       LargeChange     =   5
  33.       Left            =   2160
  34.       Max             =   50
  35.       Min             =   20
  36.       TabIndex        =   7
  37.       Top             =   600
  38.       Value           =   25
  39.       Width           =   3372
  40.    End
  41.    Begin VB.HScrollBar hsbAbsWallLength 
  42.       Height          =   252
  43.       LargeChange     =   5
  44.       Left            =   2160
  45.       Max             =   50
  46.       Min             =   20
  47.       TabIndex        =   6
  48.       Top             =   120
  49.       Value           =   25
  50.       Width           =   3372
  51.    End
  52.    Begin VB.CommandButton cmdCancel 
  53.       Cancel          =   -1  'True
  54.       Caption         =   "Cancel"
  55.       Default         =   -1  'True
  56.       Height          =   372
  57.       Left            =   4080
  58.       TabIndex        =   0
  59.       Top             =   1560
  60.       Width           =   1212
  61.    End
  62.    Begin VB.CommandButton cmdDefaults 
  63.       Caption         =   "Defaults"
  64.       Height          =   372
  65.       Left            =   2280
  66.       TabIndex        =   2
  67.       Top             =   1560
  68.       Width           =   1212
  69.    End
  70.    Begin VB.CommandButton cmdOk 
  71.       Caption         =   "Ok"
  72.       Height          =   372
  73.       Left            =   480
  74.       TabIndex        =   1
  75.       Top             =   1560
  76.       Width           =   1212
  77.    End
  78.    Begin VB.Label Label3 
  79.       Alignment       =   1  'Right Justify
  80.       Caption         =   "Relative height of Walls"
  81.       Height          =   252
  82.       Left            =   120
  83.       TabIndex        =   5
  84.       Top             =   1080
  85.       Width           =   1932
  86.    End
  87.    Begin VB.Label Label2 
  88.       Alignment       =   1  'Right Justify
  89.       Caption         =   "Relative thickness of walls"
  90.       Height          =   252
  91.       Left            =   120
  92.       TabIndex        =   4
  93.       Top             =   600
  94.       Width           =   1932
  95.    End
  96.    Begin VB.Label Label1 
  97.       Alignment       =   1  'Right Justify
  98.       Caption         =   "Absolute wall length"
  99.       Height          =   252
  100.       Left            =   120
  101.       TabIndex        =   3
  102.       Top             =   120
  103.       Width           =   1932
  104.    End
  105. Attribute VB_Name = "frmParms"
  106. Attribute VB_Creatable = False
  107. Attribute VB_Exposed = False
  108. Option Explicit
  109. Dim AbsWallLengthAtEntry As Integer
  110. Dim RelWallHeightAtEntry As Integer
  111. Dim RelWallThicknessAtEntry As Integer
  112. Private Sub cmdCancel_Click()
  113.   Unload frmParms
  114. End Sub
  115. Private Sub cmdDefaults_Click()
  116.   hsbAbsWallLength.Value = 25
  117.   hsbRelWallThickness.Value = 25
  118.   hsbRelWallHeight = 200
  119. End Sub
  120. Private Sub cmdOk_Click()
  121.   Dim SomethingChanged As Boolean
  122.   Dim TemReal As Double
  123.   SomethingChanged = False
  124.   If hsbAbsWallLength <> AbsWallLengthAtEntry Then
  125.     SomethingChanged = True
  126.     TemReal = hsbAbsWallLength
  127.     frm3DMaze.MinWallLengthInInches = TemReal / 100#
  128.     frm3DMaze.Resize = True
  129.     frm3DMaze.UserHasSolved = False
  130.     frm3DMaze.SolutionDisplayed = False
  131.     frm3DMaze.Seed = Str(Timer)
  132.   End If
  133.   If hsbRelWallThickness <> RelWallThicknessAtEntry Then
  134.     SomethingChanged = True
  135.     TemReal = hsbRelWallThickness
  136.     frm3DMaze.RelativeWidthOfWall = TemReal / 100#
  137.   End If
  138.   If hsbRelWallHeight <> RelWallHeightAtEntry Then
  139.     SomethingChanged = True
  140.     TemReal = hsbRelWallHeight
  141.     frm3DMaze.RelativeHeightOfWall = TemReal / 100#
  142.   End If
  143.   If SomethingChanged Then
  144.     frm3DMaze.Refresh
  145.   End If
  146.   Unload frmParms
  147. End Sub
  148. Private Sub Form_Load()
  149.   hsbAbsWallLength = Int(100# * frm3DMaze.MinWallLengthInInches)
  150.   AbsWallLengthAtEntry = hsbAbsWallLength
  151.   hsbRelWallThickness = Int(100# * frm3DMaze.RelativeWidthOfWall)
  152.   RelWallThicknessAtEntry = hsbRelWallThickness
  153.   hsbRelWallHeight = Int(100# * frm3DMaze.RelativeHeightOfWall)
  154.   RelWallHeightAtEntry = hsbRelWallHeight
  155. End Sub
  156.